package com.cyandpos.pad.posdata;

import com.cyandpos.pad.utils.MoneyUtils;

import java.io.Serializable;
import java.util.List;

public class Order implements Serializable {
    private String totalCount;//订单商品总数量
    private String totalAmount;//订单总金额
    private String totalDiscount;//订单总折扣
    private String changeAmount;//找零金额
    private String decPreferentialMoney;//满抵金额
    private List<Payment> payList;//付款信息列表
    private Person casherInfo;//收款员信息
    private Member memberInfo;//会员信息
    private List<SubTicketItem> subTickets;//小票列表
    private List<OfferCoupon> offerCouponList;//返券信息列表
    private List<Lotto> lottoList;//抽奖信息列表
    private String serverBillId;//CRM交易号
    private String jlbh;//小票号
    private String orderTime;//订单完成时间

    public String getOrderBeginTime() {
        return orderBeginTime;
    }

    public void setOrderBeginTime(String orderBeginTime) {
        this.orderBeginTime = orderBeginTime;
    }

    private String orderBeginTime;//订单开始时间
    private String sktno;//收款台
    private String orderNo;//订单号
    private boolean needBuyCent;
    private boolean needVipToOfferCoupon;
    private String cent;
    private String totalCent;
    private String status;// 付款状态
    private int tableId;//餐桌号
    private int mealsCount;//餐桌人数
    private int orderFunction;// 订单类型

    public int getOrderFunction() {
        return orderFunction;
    }

    public void setOrderFunction(int orderFunction) {
        this.orderFunction = orderFunction;
    }

    public int getTableId() {
        return tableId;
    }

    public void setTableId(int tableId) {
        this.tableId = tableId;
    }

    public int getMealsCount() {
        return mealsCount;
    }

    public void setMealsCount(int mealsCount) {
        this.mealsCount = mealsCount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }




    /**
     * 获取外部订单总金额 单位（分）
     * @return
     */
    public int getTotalMoneyOut(){
        int totalMoney = MoneyUtils.getMoneyInt(totalAmount);
        return totalMoney;
    }


    /**
     * 获取外部订单总数量 单位（分）
     * @return
     */
    public int getTotalNumOut(){
        int totalNum = MoneyUtils.getMoneyInt(totalCount);
        return totalNum;
    }

    public String getDecPreferentialMoney() {
        return decPreferentialMoney;
    }

    public void setDecPreferentialMoney(String decPreferentialMoney) {
        this.decPreferentialMoney = decPreferentialMoney;
    }

    public boolean isNeedBuyCent() {
        return needBuyCent;
    }

    public void setNeedBuyCent(boolean needBuyCent) {
        this.needBuyCent = needBuyCent;
    }

    public boolean isNeedVipToOfferCoupon() {
        return needVipToOfferCoupon;
    }

    public void setNeedVipToOfferCoupon(boolean needVipToOfferCoupon) {
        this.needVipToOfferCoupon = needVipToOfferCoupon;
    }

    public String getCent() {
        return cent;
    }

    public void setCent(String cent) {
        this.cent = cent;
    }

    public String getTotalCent() {
        return totalCent;
    }

    public void setTotalCent(String totalCent) {
        this.totalCent = totalCent;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getSktno() {
        return sktno;
    }

    public void setSktno(String sktno) {
        this.sktno = sktno;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(String totalCount) {
        this.totalCount = totalCount;
    }

    public String getTotalDiscount() {
        return totalDiscount;
    }

    public void setTotalDiscount(String totalDiscount) {
        this.totalDiscount = totalDiscount;
    }

    public String getChangeAmount() {
        return changeAmount;
    }

    public void setChangeAmount(String changeAmount) {
        this.changeAmount = changeAmount;
    }

    public List<Payment> getPayList() {
        return payList;
    }

    public void setPayList(List<Payment> payList) {
        this.payList = payList;
    }

    public Person getCasherInfo() {
        return casherInfo;
    }

    public void setCasherInfo(Person casherInfo) {
        this.casherInfo = casherInfo;
    }

    public Member getMemberInfo() {
        return memberInfo;
    }

    public void setMemberInfo(Member memberInfo) {
        this.memberInfo = memberInfo;
    }

    public List<SubTicketItem> getSubTickets() {
        return subTickets;
    }

    public void setSubTickets(List<SubTicketItem> subTickets) {
        this.subTickets = subTickets;
    }

    public List<OfferCoupon> getOfferCouponList() {
        return offerCouponList;
    }

    public void setOfferCouponList(List<OfferCoupon> offerCouponList) {
        this.offerCouponList = offerCouponList;
    }

    public List<Lotto> getLottoList() {
        return lottoList;
    }

    public void setLottoList(List<Lotto> lottoList) {
        this.lottoList = lottoList;
    }

    public String getServerBillId() {
        return serverBillId;
    }

    public void setServerBillId(String serverBillId) {
        this.serverBillId = serverBillId;
    }

    public String getJlbh() {
        return jlbh;
    }

    public void setJlbh(String jlbh) {
        this.jlbh = jlbh;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }
}
